<template>
  <div class="home-header">
    <div class="logo">
      <img src="../../../assets/logo.svg" alt="Logo" />
      <h6>UniCode IDE</h6>
    </div>
    <el-dropdown>
      <el-avatar :src="user" />
      <template #dropdown>
        <el-dropdown-menu>
          <el-dropdown-item>
            <el-icon><User /></el-icon> 个人中心
          </el-dropdown-item>
          <el-dropdown-item>
            <el-icon><SwitchButton /></el-icon>
            退出系统
          </el-dropdown-item>
        </el-dropdown-menu>
      </template>
    </el-dropdown>
  </div>
</template>

<script setup lang="ts">
import user from "../../../assets/user.png";
import { SwitchButton, User } from "@element-plus/icons-vue";
</script>

<style lang="css" scoped>
.home-header {
  padding: 0 10px;
  border-bottom: solid var(--t-main-border-color)  1px;
  height: 52px;
  display: flex;
  align-items: center;
}
.logo {
  color: var(--t-main-font-color);
  user-select: none;
  display: flex;
  align-items: center;
  flex: auto;
  height: 40px;
}
.logo img {
  margin-right: 10px;
  height: 40px;
  width: 40px;
}

.el-avatar {
  cursor: pointer;
}
</style>
